var app = require('../app')
	, order_helpers = require('../lib/order_helpers')
  , request = require('supertest')
  , should  = require('should');

describe('manage orders', function() {
	describe('GET /orders', function() {
		it('respond with form template',function(done){
		  request(app)
		    .get('/orders')
		    .expect('Content-Type',/html/)
		    .expect(200)
		    .end(function(err, res) {

		      done();
		    });
		})
	})

	describe('GET /orders/filter', function() {
		it('respond error msg when form data malformed', function(done) {
			request(app)
		    .get("/orders/filter?status=true")
		    .expect('Content-Type',/html/)
		    .expect(400)
		    .end(function(err, res) {
		      done();
		    });
		})
	})
})
